import Mock from 'mockjs';
import setupMock, { successResponseWrap } from '@/utils/setup-mock';

setupMock({
  setup() {

    Mock.mock(new RegExp('/api/content-period-analysis'), () => {
      const getLineData = (name: string) => {
        return {
          name,
          value: new Array(13).fill(0).map(() => Mock.Random.natural(30, 200)),
        };
      };
      return successResponseWrap({
        xAxis: new Array(13).fill(0).map((_item, index) => `${index }次投资`),
        data: [
          getLineData('基金Ⅰ'),
          getLineData('基金Ⅱ'),
          getLineData('基金Ⅲ'),
        ],
      });
    });


  },
});
